<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div v-if="result()">{{message}}</div>
        <!-- velse必须跟vif 或者velseif -->
        <div v-else>false就显示</div>

    </div>
    <script src="../vue.js"></script>
    <script>
        const app1 = new Vue({
            el: '#app',
            data: {
                message: 'true就显示',
            },
            methods: {
                result() {
                    return true;
                }
            },
        })
    </script>


    <div id="hello2">
        <!-- vif 和velse之间不能添加元素 -->
        <div v-if="score>=80">优秀</div>
        <div v-else-if="score>=60">及格</div>
        <div v-else>不及格</div>
    </div>
    <script src="../vue.js"></script>
    <script>
        const vue01 = new Vue({
            el: '#hello2',
            data: {
                score:80
            }
        })
    </script>
</body>

</html>